<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script language="javascript" type="text/javascript" src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/jquery.js"></script>
<script src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/frame.js" language="javascript" type="text/javascript"></script>
<link href="http://www.ucmaim.com/Public/Ucmaim/Admin/css/style.css" rel="stylesheet" type="text/css" />

<!--[if IE 6]>
<script src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/DD_belatedPNG.js" language="javascript" type="text/javascript"></script>
<script>
  DD_belatedPNG.fix('.nav ul li a,.top_link ul li,background');   /* string argument can be any CSS selector */
</script>
<![endif]-->
</head>
<body class="showmenu">
<style type="text/css">
    .layui-layer-tips{width:auto !important;}
</style>
<script src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/common.js" type="text/javascript"></script>
<script src="/Public/Layer/layer.js" type="text/javascript"></script>
<script src="/Public/DatePicker/DatePicker.js" type="text/javascript"></script>
<link href="/Public/DatePicker/Css/DatePicker.css" type="text/css" rel="stylesheet" />
<table width="100%" height="31px" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
    <tr>
        <td height="31"><div class="titlebt">订单结算查询</div></td>
    </tr>
</table>

<div class="main">
    <div class="operate">
        <div class="left_pad">
            <form id="search" method="get" action="<?php echo U('Admin/Finance/SettleAccount');?>">
                订单号:<input type="text" name="sn" class="inp_default" value="<?php echo ($search["sn"]); ?>" placeholder="请输入订单号"/> 买家:<input type="text" name="buyer_name" class="inp_default" value="<?php echo ($search["buyer_name"]); ?>" placeholder="请输入买家用户名"> 卖家:<input type="text" name="seller_name" class="inp_default" value="<?php echo ($search["seller_name"]); ?>" placeholder="请输入卖家用户名"><input type="submit" class="btn_blue" value="查  询"><input type="button" onclick="location.href='<?php echo U('Admin/Finance/toExcel');?>'" class="btn_blue" value="导出Excel文档" style="float: right;" />
                <input type="hidden" name="cid" id="cid"/>
            </form>
        </div>
    </div>
    <div class="list">
            <table width="100%">
                <tr>
                    <!--<th><input  name="chkall" type="checkbox" id="chkall" onClick="selectall(this.form)"></th>-->
                    <th>订单号</th>
                    <th>买家</th>
                    <th>卖家</th>
                    <th>商品名称</th>
                    <th>订单金额</th>
                    <th>手续费率</th>
                    <th>应结账金额</th>
                    <th>卖家支付宝账号</th>
                    <th>订单状态</th>
                    <th>操作</th>
                </tr>

                <?php if(empty($list)): ?><tr>
                        <td colspan="9">本区域暂无数据显示...</td>
                    </tr>
                    <?php else: ?>
                    <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><tr>
                            <td><?php echo ($v["order_sn"]); ?></td>
                            <td><?php echo ($v["buyer_name"]); ?></td>
                            <td><?php echo ($v["seller_name"]); ?></td>
                            <td><?php echo ($v["goods_title"]); ?></td>
                            <td><?php echo order_amount($v['order_number'], $v['order_price']);?></td>
                            <td><?php echo ($poundage); ?>%</td>
                            <td><?php echo order_balance($v['order_number'], $v['order_price']);?></td>
                            <td><?php echo ($v["seller_alipay"]); ?></td>
                            <td><?php echo (order_status($v["order_real_status"])); ?></td>
                            <td>
                                <a class="balance" order="<?php echo ($v["order_sn"]); ?>" href="<?php echo U('Admin/Finance/Balance ', 'sn='.$v['order_sn']);?>">打款完成</a>
                                <a href="<?php echo U('Admin/Finance/ProcessOrder', 'sn='.$v['order_sn']);?>">处理订单</a>
                            </td>
                        </tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>


            </table>
    </div>

    <div class="page"><?php echo ($page); ?></div>

</div>

<script type="text/javascript">
    $('.balance').click(function(){
        var sn = $(this).attr('order');
        if(!confirm('请核对订单号：【' + sn + '】是否正确') ){
            return false;
        }
    });
</script>
</body>
</html>